﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Huirui.Cavan.Domain.Seedwork;

namespace Huirui.Cavan.Domain.MainBoundedContext.StockModule
{
    public class StockUnit : Persistent
    {
        protected string _name;

        public StockUnit()
        {
           
        }

        public StockUnit(string name)
        {
            _name = name;
        }

        public virtual string Name
        {
            get { return _name; }
            set
            {
                if (value != null && value.Length > 20)
                    throw new ArgumentOutOfRangeException("Name", "Name value, cannot contain more than 200 characters");
                _name = value;
            }

        }
    }
}
